load("//bazel:skia_rules.bzl", "exports_files_legacy", "generate_cpp_files_for_headers", "skia_filegroup")

package(
    default_applicable_licenses = ["//:license"],
)

licenses(["notice"])

exports_files_legacy()

# In a separate file group so that these file(s) can be mapped
# into the gn/effects_imagefilters.gni file when exporting.
skia_filegroup(
    name = "public_imagefilters_hdrs",
    srcs = [
        "SkImageFilters.h",
    ],
)

skia_filegroup(
    name = "public_hdrs",
    srcs = [
        "Sk1DPathEffect.h",
        "Sk2DPathEffect.h",
        "SkBlenders.h",
        "SkBlurMaskFilter.h",
        "SkColorMatrix.h",
        "SkColorMatrixFilter.h",
        "SkCornerPathEffect.h",
        "SkDashPathEffect.h",
        "SkDiscretePathEffect.h",
        "SkGradientShader.h",
        "SkHighContrastFilter.h",
        "SkLumaColorFilter.h",
        "SkOverdrawColorFilter.h",
        "SkPerlinNoiseShader.h",
        "SkRuntimeEffect.h",
        "SkShaderMaskFilter.h",
        "SkTableMaskFilter.h",
        "SkTrimPathEffect.h",
        ":public_imagefilters_hdrs",
    ],
    visibility = [
        "//include:__pkg__",
    ],
)

skia_filegroup(
    name = "core_hdrs",
    srcs = [
        "Sk1DPathEffect.h",
        "Sk2DPathEffect.h",
        "SkBlenders.h",
        "SkBlurMaskFilter.h",
        "SkColorMatrix.h",
        "SkColorMatrixFilter.h",
        "SkCornerPathEffect.h",
        "SkDashPathEffect.h",
        "SkDiscretePathEffect.h",
        "SkGradientShader.h",
        "SkHighContrastFilter.h",
        "SkImageFilters.h",
        "SkLumaColorFilter.h",
        "SkOverdrawColorFilter.h",
        "SkPerlinNoiseShader.h",
        "SkRuntimeEffect.h",
        "SkShaderMaskFilter.h",
        "SkTableMaskFilter.h",
        "SkTrimPathEffect.h",
    ],
    visibility = [
        "//src/core:__pkg__",
    ],
)

generate_cpp_files_for_headers(
    name = "headers_to_compile",
    headers = [
        "SkGradientShader.h",
        "SkImageFilters.h",
        "SkPerlinNoiseShader.h",
    ],
)
